<!DOCTYPE HTML>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
<head>
<meta charset="utf-8">
<style>
@import url("{Acan_path_css}/acan/public.css");
@import url("{Acan_path_css}/app/weibo.css");
</style>
</head>
<body>
<div class="-body -center">

<p class="_birthday_title">请选择你的生日信息:</p>
<div class="_birthday"></div>
<!--块容器开始-->
 <div class="ub ub-ver uba b-gra uc-a1 t-bla c-wh">
<div class="ubb b-gra uinn uc-t1">
 <!--文本开始-->
	<div class="ub t-bla ulab ub-ac"> <div class="ulim">用户名</div>
	<div class="ub-f1 uinput uinn4">
		<input placeholder="hello" type="text" class="uc-a1">
	</div>
	</div><!--文本开始-->
 </div>

 </div>
 <!--块容器结束-->


<div id="ajax_login"></div>
</div>
</body>
<script>
var Acan = window.parent.Acan;
var Ahtml = window.parent.Ahtml;
var jQuery = window.parent.jQuery;
var month='',day='',hour='';
for (var i=1; i <= 12; i++) {
	month += Ahtml.tag('option',{"value":i},i+"月");
};
function dateoption(type,val,month,year){
	var title = {"Y":"年","m":"月","d":"日","h":"时"};
	var num;
	if(type=="Y"){
		start = 1950;
		end = 2012;
	}else if(type=="m"){
		start = 1;
		end = 12;
	}else if(type=="d"){
		start = 1;
		if(Acan.base.in_array(month,['1','3','5','7','8','10','12'])){
			end = 31;
		}else if(month==2){
			if(year%4 == 0){
				end = 29;
			}else{
				end = 28;
			}
		}else{
			end = 30;
		}
	}else if(type=="h"){
		start = 0;
		end = 24;
	}
	var html = '',str;
	for (var i=start; i <= end; i++) {
		if(i<10){str = "0"+i;}else{str = i}
		var obj={"value":i};
		if(val==i){obj.selected = "selected";}
		html += Ahtml.tag('option',obj,str+title[type]);
	};
	return html;
}
function setday(){
	var mobj = jQuery('._birthday select[name="m"]',document);
	var year = jQuery('._birthday input[name="Y"]',document).val();
	var month = dateoption('d','',mobj.val(),year);
	jQuery('._birthday select[name="d"]',document).html(month);
}

var html = Ahtml.tag('input',{"name":"Y","onchange":"setday()","size":4,"placeholder":"1990"},'年 ')
	+Ahtml.tag('select',{"name":"m","onchange":"setday()"},dateoption("m"))
	+Ahtml.tag('select',{"name":"d"},dateoption("d",1,1))
	+Ahtml.tag('select',{"name":"h"},dateoption("h",12));
jQuery('._birthday',document).html(html);



</script>
</html>